In recent vehicles, not only operations of various kinds of devices during the vehicle running but also automatic light-on/off of a room lamp, keyless lock and unlock of doors, security against theft, engine start and the like after the vehicle stop are integrally controlled by a microcomputer. Since the microcomputer causes a CPU to execute a given computation process based upon a clock signal, the microcomputer is provided with a clock using, for example, a crystal oscillator for generating the clock signal.
In the integral control of the vehicle, the CPU transfers from a regular operating mode for various controls required during the vehicle driving to a sleep mode for power saving when a predetermined condition is established following the engine stop, but even in the sleep mode, predetermined clock signals are required for intermittent operations of the components, for example.
In the regular operating mode, there are many targets to be controllably processed, and a clock using a crystal oscillator that has a high oscillating frequency and high frequency accuracy of approximately 0.005% is appropriate therein, but as the accuracy becomes higher, the cost of the clock is the higher and the consumption power is the larger. Therefore particularly during the engine stop when a battery is not charged, it is preferable that the clock is also switched to a clock small in power consumption, which is different from the clock at the regular operating time, in response to transferring the CPU to the sleep mode for power saving.
Therefore when the dock for sleep time is configured, for example, using a CR oscillating circuit, the clock becomes low in costs and low in consumed power, but an error in oscillating frequency becomes large depending upon an atmosphere temperature or the like, for example, the oscillating frequency changes to the extent of 5%. As a result, the switching to the clock small in consumed power causes deterioration in frequency accuracy, and it is necessary to take measures of maintaining the clock accuracy because of a higher demand for clock accuracy in the sleep mode as well.
Conventionally, for example, in Patent Document 1 there is proposed the technique of a clock with a CR oscillating circuit where an oscillating frequency of the CR oscillating circuit measured when an ambient temperature and a power source voltage conform to reference measurement conditions is stored as a reference oscillating frequency, and a frequency variation from the reference oscillating frequency is computed based upon characteristics between a predetermined temperature and the oscillating frequency and characteristics between the voltage and the oscillating frequency from detection values of the current temperature and voltage to find the current oscillating frequency for correction and keep the accuracy of the oscillating frequency.
In addition, in Patent Document 2 there is proposed the technique in which data determining a communication rate for making a data transmission time of one frame managed in a communication circuit constant based upon oscillating output characteristics varying with temperatures of the CR oscillating circuit is stored and the stored data is read out according to a detection value of the temperature to set the determined communication rate to the communication circuit and keep the control accuracy.